package com.it.travel.controller;

import com.it.travel.service.ContactService;
import com.it.travel.vo.Params.ContactParams;
import com.it.travel.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/contact")
@CrossOrigin
public class ContactController {

    @Resource
    private ContactService contactService;

    @PostMapping("")
    public Result<?> sendEmail(@RequestBody ContactParams contactParams) {
        Result<?> result = contactService.sendEmail(contactParams);
        return result;
    }
}
